import request from '@/utils/request';

// 获取平台收支列表
export async function getFinanceRecord(params: any) {
  return request('/api/platform/getFinanceRecord', {
    method: 'GET',
    params,
  });
}

// 获取交易类型
export async function getTransactionType(params: any) {
  return request('/api/platform/getTransactionType', {
    method: 'GET',
    params,
  });
}

// 获取商家端收支列表
export async function getFinanceBillList(params: any) {
  return request('/api/finance/getFinanceBillList', {
    method: 'GET',
    params,
  });
}

// 获取平台提现明细
export async function getWithdrawalRecord(params: any) {
  return request('/api/platform/getWithdrawalRecord', {
    method: 'GET',
    params,
  });
}

// 获取平台端财务tab数据
export async function getTransactionTypeCount(params: any) {
  return request('/api/platform/getTransactionTypeCount', {
    method: 'GET',
    params,
  });
}


// 获取商家端提现明细
export async function getWithdrawList(params: any) {
  return request('/api/finance/withdrawList', {
    method: 'GET',
    params,
  });
}


// 获取商家端财务tab数据
export async function getMarkCollect(params: any) {
  return request('/api/finance/getMarkCollect', {
    method: 'GET',
    params,
  });
}


// 获取提现方式
export async function getWithdrawalType(params: any) {
  return request('/api/platform/getWithdrawalType', {
    method: 'GET',
    params,
  });
}

// 审核提现
export async function operateWithdrawal(data: any) {
  return request('/api/platform/operateWithdrawal', {
    method: 'POST',
    data,
  });
}

// 加载《预提现》详情接口
export async function getWithdrawDetail(params: any) {
  return request('/api/finance/getWithdrawDetail', {
    method: 'GET',
    params,
  });
}

// 提现
export async function applyWithdraw(data: any) {
  return request('/api/finance/applyWithdraw', {
    method: 'POST',
    data,
  });
}

// 取消提现
export async function cancelWithdraw(data: any) {
  return request('/api/finance/cancelWithdraw', {
    method: 'POST',
    data,
  });
}

// 重新申请提现
export async function initDetailForReject(params: any) {
  return request('/api/finance/initDetailForReject', {
    method: 'GET',
    params,
  });
}

// 订单状态列表
export async function getStatusMap() {
  return request('/api/finance/getStatusMap', {
    method: 'GET',
  });
}